package cn.zyq.ykb.system.config.consts.system;

/**
 * 正则规则常量类
 */
public class RegularConst {
    /**
     * 必须大小写字母 + 数字 或 下划线
     */
    public static final String LETTER_NUMBER_UNDERLINE = "^(?=\\w*[0-9])(?=\\w*[A-Z])(?=\\w*[a-z])(\\w{8,20})$";

    public static final String LETTER_NUMBER_UNDERLINE2 = "^[a-zA-Z]\\w{4,15}$";

    /**
     * 手机号正则只要是1开头的11位
     */
    public static final String PHONE_RULE = "^(?:(?:\\+|00)86)?1\\d{10}$";


    public static void main(String[] args) {
        String content = "admin";
        boolean matches = content.matches(LETTER_NUMBER_UNDERLINE2);
        System.out.println(matches);
    }
}
